package org.example.test;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.example.JavaBean.plus.Teacher;
import org.example.mapper.TeacherMapper;
import org.example.service.TeacherService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

/**
 * @Auther:Liu
 * @Testname:TeacherApp
 * @Date:2025/8/4 15:46
 */
@Slf4j
@SpringBootTest
public class TeacherApp {
    @Resource
    private TeacherService service;
    @Test
    public void a(){
        Teacher teacher = new Teacher();
        teacher.setUsername("def2f2");
        service.save(teacher);
    }

    @Test
    public void b(){
        List<Teacher> list = service.list();
        for (Teacher teacher : list) {
           log.info("teacher:{}", teacher);
        }
    }
}
